﻿using System;
using System.Linq;

namespace b2.整数数组
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string s;
            Console.WriteLine("请以空格为间隔输入数组元素：");
            s = Console.ReadLine();
            string[] arr_s = s.Split();
            int[] arr = new int[arr_s.Length];
            int i = 0;
            foreach(string str in arr_s)
                arr[i++] = int.Parse(str);

            Console.WriteLine("最大值为：" + arr.Max());
            Console.WriteLine("最小值为：" + arr.Min());
            Console.WriteLine("平均值为：" + arr.Average());
            Console.WriteLine("元素之和为：" + arr.Average()*arr.Length);

            Console.ReadLine();
        }
    }
}